package com.luhuiguo.cms.shared.event;

import com.google.gwt.event.shared.GwtEvent;
import com.luhuiguo.cms.shared.model.AttachmentModel;

public class EditAttachmentCancelledEvent extends GwtEvent<EditAttachmentCancelledEventHandler> {
    public static Type<EditAttachmentCancelledEventHandler> TYPE = new Type<EditAttachmentCancelledEventHandler>();

    private final AttachmentModel attachmentModel;

    public EditAttachmentCancelledEvent(AttachmentModel attachmentModel) {
        super();
        this.attachmentModel = attachmentModel;
    }

    public AttachmentModel getAttachmentModel() {
        return attachmentModel;
    }

    @Override
    public Type<EditAttachmentCancelledEventHandler> getAssociatedType() {
        return TYPE;
    }

    @Override
    protected void dispatch(EditAttachmentCancelledEventHandler handler) {
        handler.onEditAttachmentCancelled(this);
    }
}
